<template>
  <div>
    <!--阿里云播放器-->
    <ali-player :encryptType="1"
                class="video"
                :vid="vid"
                :playauth="playAuth"
                ref="player"
                :useFlashPrism="false"
                :autoplay="true"
                :isLive="false"
                :showBuffer="true"
                :cover="cover"
                :showBarTime="true"
                :disableSeek="true"
                showBarTime="500"
                width="800px"
                controlBarVisibility="always">
    </ali-player>
  </div>
</template>

<script>
import VueAliplayer  from './common/AliPlayer'
export default {
  components: {"ali-player": VueAliplayer},
  name: 'videoPlay',
  data() {
    return {
      cover: '', //视频封面
      vid: '', //视频vid
      playAuth: '' //鉴权地址
    }
  },
  created() {
    this.getVideoData()
  },
  methods: {
    getVideoData(){
      //1、调用后台接口获取视频vid,playAuth(鉴权地址),cover(视频封面)的逻辑
      this.vid = '3a584d20c2ae4c4191df52efc46c7daa' //视频vid
      this.cover = '' //视频封面
      this.playAuth ='' //鉴权地址


      // 2、将对应的值分别赋值



    }
  }

}
</script>

<style scoped>
.video{
  margin-top: 30px;
  margin-left: 50px;
}

</style>
